From: Florian Müllner Date: Mon, 4 Aug 2025 06:04:30 +0000 (+0200) Subject: environment: Work around introspection issue X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~112^2^2~15 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ac113accf1e0927;p=gnome-shell.git environment: Work around introspection issue Methods of all classes from GioUnix erroneously show up as static methods, see https://gitlab.gnome.org/GNOME/glib/-/issues/3744. Work around this by defining the methods ourselves if we detect that case. Part-of: --- diff --git a/js/ui/environment.js b/js/ui/environment.js index 77f09bf10..bbbdf1d31 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -8,6 +8,7 @@ import Cairo from 'cairo'; import Clutter from 'gi://Clutter'; import Gdk from 'gi://Gdk'; import Gio from 'gi://Gio'; +import GioUnix from 'gi://GioUnix'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Meta from 'gi://Meta'; @@ -340,6 +341,17 @@ Object.prototype.toString = function () { } }; +// Work around https://gitlab.gnome.org/GNOME/glib/-/issues/3744 +if (!GioUnix.DesktopAppInfo.prototype.has_key) { + GioUnix.DesktopAppInfo.prototype.has_key = function (key) { + return GioUnix.DesktopAppInfo.has_key(this, key); + }; + + GioUnix.DesktopAppInfo.prototype.get_categories = function () { + return GioUnix.DesktopAppInfo.get_categories(this); + }; +} + const slowdownEnv = GLib.getenv('GNOME_SHELL_SLOWDOWN_FACTOR'); if (slowdownEnv) { let factor = parseFloat(slowdownEnv);